 class Init {
     constructor(e){
         this.e = e;
     }
     getDom(){
         let DOMH =this.e.target.clientHeight,DOMW = this.e.target.clientWidth,DOMTOP = this.e.target.offsetTop;
         console.log(this.e,'当前点击DOM原型',DOMH,DOMW,DOMTOP);
     }
 }

 class XinIt extends Init{
     constructor(name){
        super();
        this.name = name
     }
     makeStyle(json){
        let newBody = document.getElementsByTagName("body")[0];
        //  增加覆盖层
        let coverDiv = document.createElement("div"),coverDivStyle = {
            width: "100%",
            height: "100%",
            backgroundColor: "#eee",
            zIndex: 2,
            position: "fixed",
            top:"0",
            left: "0"
        };
        for(let k in coverDivStyle){
            coverDiv.style[k] = coverDivStyle[k];
        };
        newBody.appendChild(coverDiv);
        //  json
        // this.name 为真实dom , E为虚拟dom
        let E = this.name.cloneNode(true),keyStyleFile =document.styleSheets[document.styleSheets.length-1];
        // 修改整体class
        console.log(keyStyleFile.cssRules[0]);
        E.classList.add("SKELETON");
        for(let k in json){
            E.style[k] = json[k];
        };
        coverDiv.appendChild(E);
        console.log(E,newBody,json,'自定义样式');
     }
 }
 exports.Init = Init;
 exports.XinIt = XinIt;